home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Aztec C 5.0a disk 1.adf / include / hardware / cia.h < prev    next >
C/C++ Source or Header  |  1988-11-20  |  4KB  |  138 lines

  1. #ifndef    HARDWARE_CIA_H
  2. #define    HARDWARE_CIA_H
  3. #ifndef EXEC_TYPES_H
  4. #include "exec/types.h"
  5. #endif
  6. struct    CIA    {
  7. UBYTE    ciapra;
  8. UBYTE    pad0[0xff];
  9. UBYTE    ciaprb;
  10. UBYTE    pad1[0xff];
  11. UBYTE    ciaddra;
  12. UBYTE    pad2[0xff];
  13. UBYTE    ciaddrb;
  14. UBYTE    pad3[0xff];
  15. UBYTE    ciatalo;
  16. UBYTE    pad4[0xff];
  17. UBYTE    ciatahi;
  18. UBYTE    pad5[0xff];
  19. UBYTE    ciatblo;
  20. UBYTE    pad6[0xff];
  21. UBYTE    ciatbhi;
  22. UBYTE    pad7[0xff];
  23. UBYTE    ciatodlow;
  24. UBYTE    pad8[0xff];
  25. UBYTE    ciatodmid;
  26. UBYTE    pad9[0xff];
  27. UBYTE    ciatodhi;
  28. UBYTE    pad10[0xff];
  29. UBYTE    unusedreg;
  30. UBYTE    pad11[0xff];
  31. UBYTE    ciasdr;
  32. UBYTE    pad12[0xff];
  33. UBYTE    ciaicr;
  34. UBYTE    pad13[0xff];
  35. UBYTE    ciacra;
  36. UBYTE    pad14[0xff];
  37. UBYTE    ciacrb;
  38. };
  39. #define    CIAICRB_TA    0
  40. #define    CIAICRB_TB    1
  41. #define    CIAICRB_ALRM    2
  42. #define    CIAICRB_SP    3
  43. #define    CIAICRB_FLG    4
  44. #define    CIAICRB_IR    7
  45. #define    CIAICRB_SETCLR    7
  46. #define    CIACRAB_START    0
  47. #define    CIACRAB_PBON    1
  48. #define    CIACRAB_OUTMODE    2
  49. #define    CIACRAB_RUNMODE    3
  50. #define    CIACRAB_LOAD    4
  51. #define    CIACRAB_INMODE    5
  52. #define    CIACRAB_SPMODE    6
  53. #define    CIACRAB_TODIN    7
  54. #define    CIACRBB_START    0
  55. #define    CIACRBB_PBON    1
  56. #define    CIACRBB_OUTMODE    2
  57. #define    CIACRBB_RUNMODE    3
  58. #define    CIACRBB_LOAD    4
  59. #define    CIACRBB_INMODE0    5
  60. #define    CIACRBB_INMODE1    6
  61. #define    CIACRBB_ALARM    7
  62. #define    CIAICRF_TA    (1<<CIAICRB_TA)
  63. #define    CIAICRF_TB    (1<<CIAICRB_TB)
  64. #define    CIAICRF_ALRM    (1<<CIAICRB_ALRM)
  65. #define    CIAICRF_SP    (1<<CIAICRB_SP)
  66. #define    CIAICRF_FLG    (1<<CIAICRB_FLG)
  67. #define    CIAICRF_IR    (1<<CIAICRB_IR)
  68. #define    CIAICRF_SETCLR    (1<<CIAICRB_SETCLR)
  69. #define    CIACRAF_START    (1<<CIACRAB_START)
  70. #define    CIACRAF_PBON    (1<<CIACRAB_PBON)
  71. #define    CIACRAF_OUTMODE    (1<<CIACRAB_OUTMODE)
  72. #define    CIACRAF_RUNMODE    (1<<CIACRAB_RUNMODE)
  73. #define    CIACRAF_LOAD    (1<<CIACRAB_LOAD)
  74. #define    CIACRAF_INMODE    (1<<CIACRAB_INMODE)
  75. #define    CIACRAF_SPMODE    (1<<CIACRAB_SPMODE)
  76. #define    CIACRAF_TODIN    (1<<CIACRAB_TODIN)
  77. #define    CIACRBF_START    (1<<CIACRBB_START)
  78. #define    CIACRBF_PBON    (1<<CIACRBB_PBON)
  79. #define    CIACRBF_OUTMODE    (1<<CIACRBB_OUTMODE)
  80. #define    CIACRBF_RUNMODE    (1<<CIACRBB_RUNMODE)
  81. #define    CIACRBF_LOAD    (1<<CIACRBB_LOAD)
  82. #define    CIACRBF_INMODE0    (1<<CIACRBB_INMODE0)
  83. #define    CIACRBF_INMODE1    (1<<CIACRBB_INMODE1)
  84. #define    CIACRBF_ALARM    (1<<CIACRBB_ALARM)
  85. #define    CIACRBF_IN_PHI2    0
  86. #define    CIACRBF_IN_CNT    (CIACRBF_INMODE0)
  87. #define    CIACRBF_IN_TA    (CIACRBF_INMODE1)
  88. #define    CIACRBF_IN_CNT_TA    (CIACRBF_INMODE0|CIACRBF_INMODE1)
  89. #define    CIAB_GAMEPORT1    (7)
  90. #define    CIAB_GAMEPORT0    (6)
  91. #define    CIAB_DSKRDY    (5)
  92. #define    CIAB_DSKTRACK0    (4)
  93. #define    CIAB_DSKPROT    (3)
  94. #define    CIAB_DSKCHANGE    (2)
  95. #define    CIAB_LED    (1)
  96. #define    CIAB_OVERLAY    (0)
  97. #define    CIAB_COMDTR    (7)
  98. #define    CIAB_COMRTS    (6)
  99. #define    CIAB_COMCD    (5)
  100. #define    CIAB_COMCTS    (4)
  101. #define    CIAB_COMDSR    (3)
  102. #define    CIAB_PRTRSEL    (2)
  103. #define    CIAB_PRTRPOUT    (1)
  104. #define    CIAB_PRTRBUSY    (0)
  105. #define    CIAB_DSKMOTOR    (7)
  106. #define    CIAB_DSKSEL3    (6)
  107. #define    CIAB_DSKSEL2    (5)
  108. #define    CIAB_DSKSEL1    (4)
  109. #define    CIAB_DSKSEL0    (3)
  110. #define    CIAB_DSKSIDE    (2)
  111. #define    CIAB_DSKDIREC    (1)
  112. #define    CIAB_DSKSTEP    (0)
  113. #define    CIAF_GAMEPORT1    (1<<7)
  114. #define    CIAF_GAMEPORT0    (1<<6)
  115. #define    CIAF_DSKRDY    (1<<5)
  116. #define    CIAF_DSKTRACK0    (1<<4)
  117. #define    CIAF_DSKPROT    (1<<3)
  118. #define    CIAF_DSKCHANGE    (1<<2)
  119. #define    CIAF_LED    (1<<1)
  120. #define    CIAF_OVERLAY    (1<<0)
  121. #define    CIAF_COMDTR    (1<<7)
  122. #define    CIAF_COMRTS    (1<<6)
  123. #define    CIAF_COMCD    (1<<5)
  124. #define    CIAF_COMCTS    (1<<4)
  125. #define    CIAF_COMDSR    (1<<3)
  126. #define    CIAF_PRTRSEL    (1<<2)
  127. #define    CIAF_PRTRPOUT    (1<<1)
  128. #define    CIAF_PRTRBUSY    (1<<0)
  129. #define    CIAF_DSKMOTOR    (1<<7)
  130. #define    CIAF_DSKSEL3    (1<<6)
  131. #define    CIAF_DSKSEL2    (1<<5)
  132. #define    CIAF_DSKSEL1    (1<<4)
  133. #define    CIAF_DSKSEL0    (1<<3)
  134. #define    CIAF_DSKSIDE    (1<<2)
  135. #define    CIAF_DSKDIREC    (1<<1)
  136. #define    CIAF_DSKSTEP    (1<<0)
  137. #endif
  138.